<?php
global $base_url;
?>
<?php foreach ($data as $item) : ?>
    <?php $counter = 0; ?>
    <section id="category_<?php echo $item['tid'] ?>" class="products_showcase left">
        <div class="product_showcase_heading">
            <h2><?php echo $item['name'] ?></h2>
            <a href="<?php echo url('/taxonomy/term/' . $item['tid']) ?>">see more...</a>
        </div> 
        <ul>
            <?php foreach ($item['nodes'] as $model) : ?>
                <li>
                    <a href="<?php echo url('node/' . $model['product']['nid']); ?>">
                        <?php print theme('imagecache', 'product_list', $model['product']['path']); ?>
                    </a>
                    <h4><?php echo $model['product']['title'] ?></h4>
                    <?php foreach ($model['issues'] as $nid => $issue) : ?>
                        <h4><a href="<?php echo url('node/' . $nid); ?>"><?php echo $issue['num'] . ' issues - $' . $issue['price'] ?></a></h4>
                    <?php endforeach ?>
                </li>
                <?php $counter++; ?>
                <?php if ($counter % 4 == 0): ?>
                    <?php
                    $counter = 0;
                    print "<br class='clear' />";
                    ?>
                <?php endif; ?>
            <?php endforeach ?>
            <div class="clear"></div>
        </ul>
    </section>
<?php endforeach ?>
<!-- </section> -->
